/*
 * parameters.h
 *
 *  Created on: May 26, 2011
 *      Author: nzhao
 */

#ifndef PARAMETERS_H_
#define PARAMETERS_H_

#include "share/Usrdef.h"

//////////////////////////////////////////////////////////////////////////////////////////////////////////
/**\defgroup INPUT_PARAS Input Parameters (3+26)
 *  @{*/

/////////////////////////////////////////////////////////////////////////////////
/*! @name  I/O Path (3+4)
 * These variables define the paths of input information and output data.
 */
///@{
extern char	INPUT_PATH[200];		/**< directory of the input bath file */
extern char	OUTPUT_PATH[200];		/**< directory of the output result file*/
extern char	PULSE_PATH[200];		/**< Path of pulse package file*/

extern char	CONFIG_FILE_NAME[50];	/**< config file name (if assigned, default config file will be ignored)*/
extern char	INPUT_FILE_NAME[100];	/**< filename of input coordinates file*/
extern char	INPUT_PACK_NAME[100];	/**< input file for the pulse package*/
extern char	GROUP_ID[20];           /**< an identity of group*/
///@}

/////////////////////////////////////////////////////////////////////////////////
/*!@name Magnetic Field and Electronspin States (5)
 * These variables specify the magnetic field, and the electrons spin states.
 */
///@{
extern double	EXT_MAG_FIELD;			/**< external magnetic field in Tesla*/
extern double   THETA;                 /**< magnetic field polar angle*/
extern double   PHI;					/**< magnetic field azimuthal angle*/
extern int      STATE_1;				/**< state1 of the transition*/
extern int		STATE_2;				/**< state2 of the transition*/
///@}

/////////////////////////////////////////////////////////////////////////////////
/*!@name Time Sequence (3)
 * These variables specify the time points, at which the coherence are calculated.
 */
///@{
extern double   MIN_TIME;				/**< starting time*/
extern double   MAX_TIME;				/**< finishing time*/
extern int      NTIME;					/**< calculation time points*/
///@}

/////////////////////////////////////////////////////////////////////////////////
/*!@name Pulse Sequence (2)
 * These variables specify the microwave pulse sequence.
 */
///@{
extern char     STR_SEQ_NAME[10];		/**< a string indicating the pulse sequence: PDD, UDD, CDD*/
extern int      PULSE_NUM;				/**< control pulse number*/
extern double	DrvDetuning;
extern double DrvRabi;
///@}

/////////////////////////////////////////////////////////////////////////////////
/*!@name CCE Control (12)
 * These variables specify the parameters controlling the CCE method.
 */
///@{
extern int      CALCULATED_ORDER;		/**< the CCE-order in calculations*/
extern int		STATE_SEED;            	/**< random seed for initial states in single-sample algorithm, no use in ensemble CCE*/
extern double   THRESHOLDVALUE;        	/**< cut-off threshold value (in angstrom) used in the formation of the clusters*/
extern double	MEDIATED_INT_THRESHOLDVALUE;	/**< cut-off threshold value (in k rad/s) used in the formation of the clusters*/
extern double   AMPLITUDE_VALUE;       	/**< Collect all clusters*/
extern int		APPROXIMATION;			/**< approximation mode*/
extern double	EXP_DECAY_RATE;			/**< phenomenological exponetial decay rate*/
extern int		TASK_MODE;				/**< task mode: single-sample, ensemble, W-sample, noise spectrum*/
extern int      CACHE_Q;               	/**< determine whether or not to cache the highest order result, default: 0 //not cache*/
extern int		IS_BLK;					/**< switch of secular approximation*/
extern int		IsMediated;				/**< switch of the mediated interaction*/
extern int      IsCore;					/**< switch of FP data*/
///@}

/////////////////////////////////////////////////////////////////////////////////
/*!@name Other Global (Derived) Parameters
 * These variables specify the parameters are derived from the direct-input parameters.
 */
///@{
extern char    	VERSION_INFO[100];		/**< source code version*/
extern char    	EXEC[200];				/**< executable command name*/
extern char    	OUTPUT_FILE_NAME[500];	/**< filename of result file (automatically generated according to the parameters)*/

extern double  	TIME_STEP;				/**< time step*/
extern int			IsDriving;
///@}

void Load_Config();								/**<Loading the config file*/
void ParameterResolve(int argc, char ** argv); 	/**<core function resolving the input parameters*/

/**@}*/

#endif /* PARAMETERS_H_ */
